1. Field of the Invention
The present invention relates to a vectorization system to be used in a language processing system such as compiler or pre-processor, etc., for a computer having vector processing function and, particularly, to a vectorization system for performing a vectorization for a computer to make an efficient use of vector processing function thereof.
The term "vectorization" is to receive a source program to which no vector processing is considered or any intermediate expression equivalent thereto inputted as an input program and to output an object program containing a vector processing instruction, the source program modified such that a vector processing instruction can be easily produced or an intermediate expression containing the vector processing instruction, etc., as an output program.
In a computer having the above-mentioned vector processing function, execution of vector processing is performed at very high speed compared with that of a scaler processing. Therefore, in order to enhance the performance of a computer, that is, the so-called Vector Processor, which can execute vector processing, it is very important to increase a ratio of a portion of an object program which is executed by vector processing, that is, vectorization rate. In view of this, it has been desired to vectorize the object program in the above-mentioned compiler processing for the vector processor to as high rate as possible.
Further, a pre-processor for the above-mentioned computer functions, in order to make a compiler possible to achieve a higher vectorization rate within its vectorization capability, to modify a format of the source program which is described with a high level language such as FORTRAN, etc., to one which is easily vectorized by a compiler, that is, a format capable of being recognized as to be vectorizable. Such vectorization in the pre-processor is also important to improve vectorization rate of the object program.
Further, even in language processing systems other than those of the compiler and the pre-processor, vectorization of an input program shall contribute to improvement of vectorization rate of the object program.
2. Prior Art Description
Objects to be subjected to such vectorization processing are loop parts of an input program or an intermediate expression corresponding to the input program, that is, a collection of statements forming the loop or their intermediate expressions. By recognizing respective array subscripting patterns in these loop parts, the data dependence among the respective arrays can be analysed. In this analysis, when variables to be used as subscripters of the arrays are defined by assignment statement in a format "variable= variable+ increment value" (where variable in the left side term is identical to variable in the right side term), the variable is specifically referred to as "induction variable".
An example of prior art vectorization systems of this type is disclosed in M. Wolfe: "Software Optimization for supercomputers", in "SUPERCOMPUTERS Class VI Systems, Hardware and Software", pp. 221-238 (Edited by Sidney FERNBACH, ELSEVIER SCIENCE PUBLISHERS B. V.). In this article, as an optimizing method for making a computer able to have vector processing function, "Induction Variables Recognition" is disclosed (cf. page 224, FIG. 4). The "Induction Variables Recognition" means to exclude from a loop those of induction variables other than the last assignment.
Although this prior art can be adapted independently to a certain conditional structure in the loop, that is, a conditional structure of IF block, etc., which follows IF statement, it can not be adapted when induction variable defined by a conditional structure, that is, conditional induction variable, is referenced over the conditional structure. The fact that conditional induction variable is referenced over conditional structure will be referred to "global reference of conditional induction variable".
An object of the present invention is to provide a vectorization system having a loop containing conditional induction variable with global reference as an object to be vectorized.
Incidentally, although the increment value in the above-mentioned assignment statement is usually a constant, the present invention is also applicable to a case where the increment value is not a constant. Therefore, unless otherwise specified, the increment value shall not be limited to a constant.